home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.3 / Video Toaster v4.3.iso / 3.1 / toasterall / arexx_examples / toastcmx1frame.rexx < prev    next >
OS/2 REXX Batch file  |  1993-06-06  |  2KB  |  46 lines

  1. /* ToastCMX1Frame.rexx, Uses GPI trigger from CMX editor for single frame animation */
  2. /* By Arnie Cachelin © 1992 NewTek Inc. */
  3.  
  4. /*
  5.     This program will display ALL the frames in the current FrameStore
  6.     directory in a slideshow manner, using whatever transition is currently
  7.     selected.  It waits for input from the GPI trigger so you can control your
  8.     your  presentation  slideshow  style.  You can easily give your Toaster
  9.     GPI pulses by attaching a spare mouse or joystick to the second mouse
  10.     port then clicking the button.  You can also find long joystick extender
  11.     cables at places like Radio Shack.  You may want to move the frames you
  12.     plan to show to another framestore directory, like RAM:, so that the
  13.     presentation can loop, without displaying unwanted images.
  14.  
  15.     To set up, load the first frame of the animation into DV1,
  16.     put bars or something else into DV2, run this script from a shell
  17.     by typing "rx ToastCMX1Frame", and start the edit.  The first frame
  18.     (which you loaded) will be recorded, and then the next (in order) will
  19.     be recorded during the 1 sec wait after the editor sends the GPI pulse in.
  20. */
  21.  
  22. OPTIONS RESULTS
  23. TOASTERLIB="ToasterARexx.port"
  24.  
  25. IF ~SHOW('Libraries',TOASTERLIB) THEN
  26.   IF ~ADDLIB(TOASTERLIB , 0) THEN x=Bummer(" Please start your Video Toaster!")
  27.  
  28. Switcher(TOSW)        /* Go to Switcher screen */
  29. Switcher(TOSW)        /* Go to Switcher screen */
  30. Switcher(SGPI,POS)    /* Set GPI trigger to positive (leading edge of pulse) */
  31. Switcher(MDV1)        /* put Program and Preview outputs on framestores */
  32. Switcher(PDV2)
  33. Switcher(GOLD)        /* Set keypad to frame loading */
  34. N=Switcher(STAT,KNUM) /* Get the current keypad number, so we know where we started */
  35. Switcher(KEYP)        /* hit the '+' key */
  36. DO WHILE Switcher(STAT,KNUM)~=N   /* Go until we return to the starting frame */
  37.   Switcher(MDV2)    /* put DV2 on Program out, force to load next into DV1 */
  38.   Switcher(DOEN)    /* hit enter key to load */
  39.   Switcher(MDV1)    /* put DV1 on Program out */
  40.   Switcher(KEYP)    /* hit the '+' key */
  41.   Switcher(WAIT,GPI)    /* Wait for GPI trigger to come in */
  42.   Switcher(FRES)    /* Reset frame counter */
  43.   Switcher(WAIT,30) /* Wait for 30 frames (1 sec) to pass */
  44. END
  45.  
  46.